﻿using System;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using XLua;
namespace Game.Lua
{
    [LuaCallCSharp()]
    public static class LuaExtension
    {
        [LuaCallCSharp()]
        public static object GetText(this GameObject gameObject)
        {
            return gameObject.GetComponent(typeof(TMP_Text));
        }
        
        // [LuaCallCSharp()]
        // public static void SetText(this TMP_Text tmpText,string text)
        // {
        //     tmpText.SetText();
        // }
        [LuaCallCSharp()]
        public static TMP_InputField GetInputField(this GameObject gameObject)
        {
            return gameObject.GetComponent<TMP_InputField>();
        }
        [LuaCallCSharp()]
        public static Button GetButton(this GameObject gameObject)
        {
            return gameObject.GetComponent<Button>();
        }
        

    }

}